package com.graducationdesign.springboot.controller.Teacher;

import com.graducationdesign.springboot.entities.Student.GraducationDesign.AllGraducationDesign;
import com.graducationdesign.springboot.mapper.AllGraducationDesignMapper;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/**
 * @author Mr.zhneg
 * @create 2020-02-02-22:55
 */
@Controller
public class MyGraductionDesignForTeaController {
    org.slf4j.Logger logger=  LoggerFactory.getLogger(getClass());

    @Autowired
    AllGraducationDesignMapper allGraducationDesignMapper;

    @GetMapping("/mydesignsfortea")
    public String list(Map<String,Object> map , HttpServletRequest request){

        logger.info("我的毕业设计：");
        Object loginuser= request.getSession().getAttribute("loginUser");

        List<AllGraducationDesign> allGraducationDesign= allGraducationDesignMapper.myGraducationDesigns(loginuser);
        map.put("allGraducationDesign",allGraducationDesign);

        return "Teacher/graduationDesignMoudle/mygraduationdesignlist";
    }
}
